/*
 *    Copyright (c) 2018-2025, nart All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: nart
 */

package com.nai365.nart.operation.entity;


import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.time.LocalDateTime;

/**
 * 优先购
 *
 * @author baogs
 * @date 2022-07-01 11:13:17
 */
@Data
@TableName("opt_preemption")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "优先购")
public class Preemption extends Model<Preemption> {

	private static final long serialVersionUID = 1L;

	/**
	 * id
	 */
	@ApiModelProperty(value = "id")
	@TableId(type = IdType.ASSIGN_ID)
	private Long id;

	/**
	 * 用户id
	 */
	@ApiModelProperty(value = "用户id")
	private Long userId;

	/**
	 * 类型：1：不限制2：限制藏品类别3：限制藏品
	 */
	@ApiModelProperty(value = "类型：1：不限制2：限制藏品类别3：限制藏品")
	private Integer type;

	/**
	 * 类别id,type=2有效
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "藏品类别id")
	private Long categoryId;

	/**
	 * 藏品id,type=3有效
	 */
	@TableField(updateStrategy = FieldStrategy.IGNORED)
	@ApiModelProperty(value = "藏品id")
	private Long artifactId;

	/**
	 * 数量
	 */
	@ApiModelProperty(value = "数量")
	private Integer quantity;

	/**
	 * 有效期，开始时间，如果为空不限制开始使用时间
	 */
	@ApiModelProperty(value = "有效期，开始时间，如果为空不限制开始使用时间")
	private LocalDateTime effectBeginTime;

	/**
	 * 有效期，结束时间，如果为空不限制使用结束时间
	 */
	@ApiModelProperty(value = "有效期，结束时间，如果为空不限制使用结束时间")
	private LocalDateTime effectEndTime;

	/**
	 * 有效状态：1：有效0：无效
	 */
	@ApiModelProperty(value = "有效状态：1：有效0：无效")
	private Integer effect;

	/**
	 * 使用次数
	 */
	@ApiModelProperty(value = "使用次数")
	private Integer useCount;

	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	private Long createBy;

	/**
	 * 修改人
	 */
	@ApiModelProperty(value = "修改人")
	private Long updateBy;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 修改时间
	 */
	@ApiModelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * delFlag
	 */
	@TableLogic(value = "0", delval = "1")
	@ApiModelProperty(value = "delFlag")
	private String delFlag;

}
